<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>GShark</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/lib/font-awesome-4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="/lib/adminLET2/css/AdminLTE.min.css">
    <link rel="stylesheet" href="/lib/adminLET2/css/skins/skin-blue.css">
    <link rel="stylesheet" href="/css/main.css">
    <link rel="stylesheet" href="/lib/code_prettify/prettify.css">
    <script src="/lib/code_prettify/prettify.js"></script>
</head>
<body class="hold-transition skin-blue sidebar-collapse" onload="prettyPrint()">
<div class="wrapper">
{{template "header"}}
{{template "menu" . }}
    <div class="content-wrapper">
        <section class="content-header">
            <h1>
                APP 搜索报告
            </h1>
            <ol class="breadcrumb">
                <li><a href="/admin/reports/app/" class="btn btn-success c-add-btn"> 主页</a></li>
                <li class="btn btn-success c-add-btn">检测结果</li>
            </ol>
        </section>
        <section class="content">
            <div class="row c-manager">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-body">
                            <div class="filter">
                                <div class="row">
                                    <div class="col-xs-8">
                                        <div class="col-xs-2">
                                            <label>状态：</label>
                                        </div>
                                        <div class="form-group col-xs-6">
                                            <div class="status">
                                                <input name="status" type="radio" id="unhandled" value="unhandled"
                                                       {{if eq 0 .status}}checked{{end}}></input>
                                                <label>未处理</label>
                                                <input name="status" type="radio" id="confirmed" value="confirmed"
                                                       {{if eq 1 .status}}checked{{end}}></input>
                                                <label>已确认</label>
                                                <input name="status" type="radio" id="ignored" value="ignored"
                                                       {{if eq 2 .status}}checked{{end}}></input>
                                                <label>已忽略</label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-xs-6"></div>
                                </div>
                            </div>
                            <table class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr align="center">
                                    <th>ID</th>
                                    <th>App Name</th>
                                    <th>Market</th>
                                    <th>Deploy Date</th>
                                    <th>Description</th>
                                {{if eq 0 .status}}
                                    <th colspan="2">Review</th>
                                {{else}}
                                    <th>Status</th>
                                {{end}}
                                </tr>
                                {{range .reports}}
                                <tr>
                                    <td>{{.Id}}</td>
                                    <td><a href="{{.AppUrl}}" target="_blank">{{.Name}}</a></td>
                                    <td>{{- if (.Market) }}华为应用市场{{- end}}</td>
                                    <td>{{.DeployDate}}</td>
                                    <td>{{.Description}}</td>
                                {{if eq 0 .Status}}
                                    <td><a href="/admin/reports/app/confirm/{{.Id}}"><img src="/img/confirm.png" alt="确认" title="确认"/></a></td>
                                    <td><a href="/admin/reports/app/cancel/{{.Id}}"><img src="/img/file.png" alt="忽略文件" title="忽略"/></a></td>
                                {{else}}
                                    <td>{{if eq 1 .Status}}Confirmed{{else}}Ignored{{end}}</td>
                                {{end}}
                                </tr>
                                {{end}}
                                </thead>
                            </table>
                            <div class="page-arear">
                                <ul class="pagination">
                                    <li><a href="/admin/reports/app/1">第一页</a></li>
                                    <li><a href="/admin/reports/app/{{.pre}}">上一页</a></li>
                                {{ range $i, $v := .pageList }}
                                {{ if eq $v $.page }}
                                    <li class="active"><a href="/admin/reports/app/{{$v}}">{{$v}}</a></li>
                                {{ else }}
                                    <li><a href="/admin/reports/app/{{$v}}">{{$v}}</a></li>
                                {{ end }}
                                {{ end }}
                                {{ if eq $.page $.lastPage}}
                                    <li><a class="disabled" href="/admin/reports/app/{{.next}}">下一页</a></li>
                                    <li><a class="disabled" href="/admin/reports/app/{{.pages}}">最后一页</a></li>
                                {{ else }}
                                    <li><a href="/admin/reports/app/{{.next}}">下一页</a></li>
                                    <li><a href="/admin/reports/app/{{.pages}}">最后一页</a></li>
                                {{ end }}
                                </ul>
                                <div class="count">共 {{.count}} 条</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
</div>
<script src="/lib/jQuery/jquery-2.2.3.min.js"></script>
<script src="/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="/lib/datatables/jquery.dataTables.min.js"></script>
<script src="/lib/datatables/dataTables.bootstrap.min.js"></script>
<script src="/lib/adminLET2/js/app.min.js"></script>
<script src="/js/common.js"></script>
</body>
</html>
